﻿using System;
using Viettel.VOFFICE.DAO.Models;
using Viettel.VOFFICE.Web.Helpers;

namespace Viettel.VOFFICE.Web.Models
{
    public class UserModel : BaseModel
    {
        public UserModel(){}
        public Guid UserId { get; set; }
        public string UserName { get; set; }
        public string RoleName { get; set; }
        public string Email { get; set; }
        public string Password { get; set; }
        public string ConfirmPassword { get; set; }
        public bool Gender { get; set; }
        public string FullName { get; set; }
        public string Address { get; set; }
        public string Mobile { get; set; }
        public string Telephone { get; set; }
        public bool IsApproved { get; set; }
        public string RoleDisplayName { get; set; }

        public UserModel(aspnet_Users user)
        {
            // TODO: Complete member initialization
            var profile = ProfileHelpers.GetUserProfile(user.UserName);
            UserId = user.UserId;
            FullName = profile.FullName;
        }
    }
    public class UserInRoleModel : BaseModel
    {
        public UserInRoleModel() { }
        private Guid userId;
        private Guid roleId;
        public Guid UserId
        {
            get { return System.Guid.NewGuid(); }
            set { value = userId; }
        }
        public Guid RoleId
        {
            get { return System.Guid.NewGuid(); }
            set { value = roleId; }
        }
        public string RoleName { get; set; }
        public string UserName { get; set; }
        public bool IsInRole { get; set; }
    }
}